package cn.rkylin.oms.warehouse.shiporder.dao;

import cn.rkylin.oms.warehouse.shiporder.domain.Shiporder;
import cn.rkylin.oms.warehouse.shiporder.domain.ShiporderSku;
import cn.rkylin.oms.warehouse.shiporder.vo.ShiporderVO;

import java.util.List;

/**
 * 发货DAO
 *
 * @author 齐涛
 * @version 1.0
 * @created 28-9-2017 10:51:30
 */
public interface ShiporderDAO {

    /**
     * 查询发货单列表
     *
     * @param shiporderVO 发货单VO
     * @return 发货单列表
     * @throws Exception 异常
     */
    public List<ShiporderVO> selectShiporderList(ShiporderVO shiporderVO) throws Exception;

    /**
     * 查询发货单列表为取消
     * 
     * @param shiporderVO
     *            发货单VO
     * @return 发货单列表
     * @throws Exception
     *             异常
     */
    public List<ShiporderVO> selectShiporderListForCancel(ShiporderVO shiporderVO) throws Exception;
    
    /**
     * 查询发货单商品列表
     * 
     * @param shiporderSku
     *            发货单商品
     * @return 发货单商品列表
     * @throws Exception
     *             异常
     */
    public List<ShiporderSku> selectByVOShiporderSku(ShiporderSku shiporderSku) throws Exception;
    
    /**
     * 查询发货单信息
     *
     * @param shiporderVO 发货单VO
     * @return 发货单信息
     * @throws Exception 异常
     */
    public ShiporderVO getShiporderInfo(ShiporderVO shiporderVO) throws Exception;
    
    /**
     * 查询需要平台发货的信息
     * @param shopVO
     * @return
     * @throws Exception
     */
    public List<ShiporderVO> selectByShopVoShipOrderConsign(cn.rkylin.oms.system.shop.vo.ShopVO shopVO) throws Exception;

    /**
     * 更新发货单
     *
     * @param shiporder 发货单bean
     * @return 更新条数
     * @throws Exception 异常
     */
    public int updateShiporder(Shiporder shiporder) throws Exception;

    /**
     * 系统发货单主表信息插入数据库
     *
     * @param shiporderVO
     * @return
     * @throws Exception
     */
    public int insertSelectiveShiporder(ShiporderVO shiporderVO) throws Exception;

    /**
     * 系统发货单商品明细表信息插入数据库
     *
     * @param shiporderSku
     * @return
     * @throws Exception
     */
    public int insertSelectiveShiporderSku(ShiporderSku shiporderSku) throws Exception;
    
    /**
     * 更新
     * @param shiporderVO
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelectiveShipOrder(ShiporderVO shiporderVO) throws Exception;
}
